#ifndef __PWR_H
#define __PWR_H

#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "system_remap.h"


/**
  * @}
  */

 
/** @defgroup PWR_Regulator_state_is_Sleep_STOP_mode 
  * @{
  */

#define PWR_Regulator_ON                ((uint16_t)0x0000)
#define PWR_Regulator_LowPower          ((uint16_t)0x0100)

/**
  * @}
  */

/** @defgroup PWR_SLEEP_mode_entry 
  * @{
  */

#define PWR_SLEEPEntry_WFI              ((uint8_t)0x01)
#define PWR_SLEEPEntry_WFE              ((uint8_t)0x02)

 
/**
  * @}
  */

/** @defgroup PWR_STOP_mode_entry 
  * @{
  */

#define PWR_STOPEntry_WFI               ((uint8_t)0x01)
#define PWR_STOPEntry_WFE               ((uint8_t)0x02)
#define PWR_STOPEntry_SLEEPONEXIT       ((uint8_t)0x03)



#define LDO_EN_MASK					((uint16_t)0x400)
#define LDO_OUTPUT_MASK			((uint16_t)0x1800)

#define LDO_OUTPUT_2V6			0x00
#define LDO_OUTPUT_2V8			0x01
#define LDO_OUTPUT_3V0			0x02
#define LDO_OUTPUT_3V3			0x03

/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */


/* Low Power modes configuration functions ************************************/
void PWR_EnterSleepMode(uint8_t PWR_SLEEPEntry);
void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry);


void LDO_OutputLevelSet(uint8_t LDO_OutpLevel);
void LDO_LowPower(FunctionalState NewState);
void LDO_Cmd(FunctionalState NewState);
#ifdef __cplusplus
}
#endif

#endif /* __PWR_H */

